package com.tanhua.admin.utils;

import com.tanhua.admin.pojo.User;

/**
 * @ClassName UserThreadLocal
 * @Description TODO 统一处理token
 * @Author JavaDev
 * @Date 2021/1/7 15:40
 * @Version 1.0
 */
public class UserThreadLocal {

    private static final ThreadLocal<User> USER_THREAD_LOCAL = new ThreadLocal<User>();

    public UserThreadLocal() {
    }

    public static void set(User user) {
        USER_THREAD_LOCAL.set(user);
    }

    public static User get() {
        return USER_THREAD_LOCAL.get();
    }
}































